﻿using HYQY_Core.Entities.Utils;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static HYQY_App.Tool.Image.ImageDto;

namespace HYQY_App.Tool.Image
{
    /// <summary>
    /// 公共添加图片接口
    /// </summary>
    public interface IImageService
    {
        /// <summary>
        /// 上传图片到ImgBB
        /// </summary>
        /// <param name="file">上传的文件</param>
        /// <param name="type">图片类型</param>
        /// <returns></returns>
        public Task<ImgBBResponse> UploadImageImgBB(IFormFile file, string type, string wareCode);

        /// <summary>
        /// 批量添加图片
        /// </summary>
        /// <param name="imageUrls">图片url数组</param>
        /// <param name="wareCode">商品编码</param>
        /// <param name="type">图片类型</param>
        /// <param name="userName">用户名</param>
        /// <returns></returns>
        public Task InsertImagesAsync(List<string> imageUrls, string wareCode, string type, string userName);

        /// <summary>
        /// 批量删除图片
        /// </summary>
        /// <returns></returns>
        // 1. 提取公共方法，消除重复代码
        public Task<ResponseStatus> DeleteImages(DeleteImagesAsyncInput input);
    }
}
